import time
class Time:
    def __init__(self):
        self.__hour,self.__minute,self.__second = self.__setInfo()

    def showTime(self):
        print("当前时间：",self.__hour,"时",self.__minute,"分",self.__second,"秒")

    def setTime(self,elapseTime):
        return self.__setInfo(elapseTime)

    def __setInfo(self,elapseTime=0):
        if elapseTime == 0:
            currentTime = time.time()
        else:
            currentTime = elapseTime
        totalSeconds = int(currentTime)
        currentSecond, totalMinutes = totalSeconds % 60, totalSeconds // 60
        currentMinute, totalHours = totalMinutes % 60, totalMinutes // 60
        if totalHours==0:
            currentHour = 0
        else:
            if elapseTime==0:
                currentHour = (totalHours+8) % 24
            else:
                currentHour = totalHours % 24
        return currentHour,currentMinute,currentSecond

def main():
    t1 = Time()
    t1.showTime()
    t_input = eval(input("请输入秒数："))
    h,m,s = t1.setTime(t_input)
    print(h,"时",m,"分",s,"秒")

main()